using System;
using System.Collections;
using System.Collections.Generic;
using Unity.VisualScripting;
using UnityEngine;
using UnityEngine.UI;

public class Wind : MonoBehaviour
{
    public static Wind Instance;
    public void Awake()
    {
        Instance = this;
    }

    // Start is called before the first frame update
    void Start()
    {
        Transform canvas = transform.GetChild(0);
    }
    
   
    // Update is called once per frame
    void Update()
    {
        
    }

    //通过碰撞检测
    private void OnCollisionEnter2D(Collision2D other)
    {
        if (other.gameObject.CompareTag("Player"))
        {
            PlayerController pc = other.gameObject.GetComponent<PlayerController>();
            pc.trapped();
        }
    }

    public void Destroy()
    {
        Destroy(this.gameObject);
    }
}
